package casa.depesos.app.com.http.req;

import java.util.Map;

import casa.depesos.app.com.http.HttpReq;
import casa.depesos.app.com.http.ReqCallback;
import casa.depesos.app.com.http.bean.GetCodeBean;
import casa.depesos.app.com.http.data.CardInfo;
import casa.depesos.app.com.http.parser.GetCodeParser;
import casa.depesos.app.com.utils.Constant;

public class CheckIdReq implements HttpReq<GetCodeBean> {

    CardInfo info;

    public CheckIdReq(CardInfo info) {
        this.info = info;
    }

    @Override
    public void req(ReqCallback<GetCodeBean> callback) {//   /app/orcAndFace/checkIdCard
        req("/app/ocrAndBiometric/validateIdentificationCard", new GetCodeParser(), callback);
    }

    @Override
    public Map getBody() {
        Map map = HttpReq.super.getBody();
        map.put("reqnum", Constant.getApplyId());
        map.put("identitcode", info.id);
        map.put("fsurname", info.fName);
        map.put("msurname", info.mName);
        map.put("nam", info.name);
        return map;
    }
}
